/*var testW = "Use(Venue, Name='/wwe/erer', Address=eval('sdfsdfsd'))\
			 ForEach(/eer/wew[0]/ew) {\
			 	Use(VenueLocation, Name='sdfs\'d\'f', Description=/werwe/dsfsdf)\
			 	ForEach(/ewew/werw/fg) {\
			 		Use(Event, Name='sdfs\'d\'f', Genre=/werwe/dsfsdf)\
			 		Use(Concert, Performer=eval('alert(\\'ok\\')'))\
			 	}\
			 	Click(/wwe/erer)\
			 }\
			 Use(Venue, Name='/fff/erer')";

CultureMuncher.Workflow.init(testW, 0);
var ee = CultureMuncher.Workflow.toString();
dump(ee);
dump('===============================================')
CultureMuncher.Workflow.init(ee, 0);
ee = CultureMuncher.Workflow.toString();
dump(ee);

// create controls
CultureMuncher.Workflow.createControl(document);


//////////////////////////////////////////
// storage




$(document).ready(function(){
    	$.ajax({
		  url: 'http://www.guiadelocio.com/barcelona/conciertos',
		  success: function(data) {
		    $('#dd').html(data);
		    alert('Load was performed.');
		  },
		  error: function(data) {
		  	$('#dd').html(data);
		    alert('Load error.');
		  }
		});    	
    });
    

///

var mainWindow = null;

function startup() {
  mainWindow = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
                     .getInterface(Components.interfaces.nsIWebNavigation)
                     .QueryInterface(Components.interfaces.nsIDocShellTreeItem)
                     .rootTreeItem
                     .QueryInterface(Components.interfaces.nsIInterfaceRequestor)
                     .getInterface(Components.interfaces.nsIDOMWindow);
   
  

  // Sidebar is unloading
  var con = new SQLite("cm.sqlite");
  
  var res = con.execute("SELECT * FROM Test");
    for(var i=0;i<res.length;i++){
        alert(res[i].name+":"+res[i].Name);
    } 
}

function shutdown() {
  
}

window.addEventListener("load", startup, false);
window.addEventListener("unload", shutdown, false);
*/